Previous Book Contents Book Index Next

Inside Macintosh: Mac OS 8 Toolbox Reference /
Chapter 2 - Control Manager Reference / Control Manager Functions
Accessing and Changing Control Settings and Data /


SetControlFontStyle

NEW WITH THE APPEARANCE MANAGER

Sets the font style for the specified control.

pascal OSErr SetControlFontStyle (
                     ControlHandle inControl,
                     const ControlFontStyleRec *inStyle);
inControl
On input, a handle to the control whose font style you wish to set.
inStyle
On input, a pointer to a control font style structure. If the flags field is cleared, the control uses the system font unless the control variant kControlUsesOwningWindowsFontVariant has been specified (control uses window font).
function result
A result code; see "Result Codes".
DISCUSSION
The SetControlFontStyle function sets the font style for a given control. To specify the font for controls in a dialog box, it is generally easier to use the dialog control font table resource. SetControlFontStyle allows you to override a control's default font (system or window font, depending upon whether the control variant kControlUsesOwningWindowsFontVariant has been specified). Once you have set a control's font with this function, you can cause the control to revert to its default font by passing a control font style structure with a cleared flags field in the inStyle parameter.

SEE ALSO
"Appearance Manager Gestalt Selector Constants".


Previous Book Contents Book Index Next

© Apple Computer, Inc.
8 JAN 1998